﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Diagnostics;
using ResPackClient.DataBase;

namespace ResPackClient
{
    /// <summary>
    /// Interaction logic for AddType.xaml
    /// </summary>
    public partial class AddType : Window
    {
        public AddType(ResPackDataSet ds)
        {
            Debug.Assert(ds != null);

            InitializeComponent();
            this.DataContext = ds;
        }

        private void OnOk(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            this.Close();
        }

        public string HeaderSize
        { 
            get { return _size; } 
            set 
            {
                _size = value;

                if (string.IsNullOrEmpty(value))
                {
                    throw new ApplicationException("Champ Vide");
                }
            } 
        }
        private string _size = "test";
    }
}
